From: Jakub KulĂ­k Date: Fri, 17 Dec 2021 00:32:08 +0000 (+0000) Subject: docs: Mention GtkImage and GtkPicture changes X-Git-Tag: archive/raspbian/4.6.5+ds-1+rpi1~1^2~91^2^2~40^2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=484c0fdd15704edd3a12e2faea3dae3f7f6cab5a;p=gtk4.git docs: Mention GtkImage and GtkPicture changes --- diff --git a/docs/reference/gtk/migrating-3to4.md b/docs/reference/gtk/migrating-3to4.md index 068b97212a..c45098d777 100644 --- a/docs/reference/gtk/migrating-3to4.md +++ b/docs/reference/gtk/migrating-3to4.md @@ -1276,6 +1276,15 @@ is provided in the form of a `GtkIconPaintable` (this can be checked with [method@Gtk.IconPaintable.is_symbolic]), you have to call [method@Gtk.IconPaintable.get_icon_name] and set the icon name on a `GtkImage`. +### Adapt to GtkImage changes +`GtkPicture`'s behaviour was "split out" of `GtkImage` as the latter was covering +too many use cases; if you're loading an icon, [class@Gtk.Image] in GTK3 and GTK4 are +perfectly equivalent. If you are loading a more complex image asset, like a picture +or a thumbnail, then [class@Gtk.Picture] is the appropriate widget. + +One noteworthy distinction is that while `GtkImage` has its size computed by +GTK, `GtkPicture` lets you decide about the size. + ### Update to GtkFileChooser API changes `GtkFileChooser` moved to a GFile-based API. If you need to convert a path